<include file="Public/head" />
<style type="text/css">
    .mianR .cha{margin-bottom: 10px;}
    .new_equipment_btn{width:100px;border-radius: 3px;color: #fff;margin-left: 7px;padding: 3px;background-color: #20ab4f;border: medium none;}
    .chenggong1 .paidan{padding-top:30px;3
    .paidan h3{font-size:16px;color:#000;margin-bottom: 30px;}
</style>
</head>
<include file="Public/common_header" />
<div class="mian">
    <include file="Public/sidebar"  menu="nrgl.gggl" />

    <div class="mianR">

        <h3 class="cha">公告管理</h3>
        <div class='carousel'>
            <div class="yuSuo clearfix">
                <div id="new_owner" class="xinzeng clearfix">
                    <input type="button" value="添加公告" onclick="location.href = '/Announce/add'" class="new_equipment_btn"/>
                </div>
                <form id="searchFrom">
                    <div id="search2">
                        <div class="source_input">
                            <input type="text" id='title' name='title' placeholder="请输入标题">
                        </div>
                    <div class="shangSou">
                        <input type="button" id="search" value="搜索" class="suoSou">
                    </div>
                    </div>
                </form>
        </div>
        <div class="yunBei" style="z-index:999998"></div>
        <div class="yuList">
            <div class="listBox" id="listBox"></div>
        </div>
    </div>
    <div class="clear"></div>
    <script type="text/javascript">
        //获取url中的参数
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
            if (r != null)
                return unescape(r[2]);
            return null; //返回参数值
        }
        $(function(){
           $("#search").click(function(){
               title = $('#title').val();
               get_list(title);
           })
        });
        var title = '';
        get_list(title);
        function get_list(title) {
            $.get("/Announce/announce_list/"+ encodeURI("title/" + title),{}, function (data) {
                $("#listBox").html(data);
            }, "html");
        }
        function get_page(p) {
            $.get("/Announce/announce_list/" + encodeURI("p/" + p),{}, function (data) {
                $("#listBox").html(data);
            }, "html");
        }

    </script>
    <include file="Public/foot" />
